#define _CRT_SECURE_NO_WARNINGS 1
int singleNumber(int* nums, int numsSize)
{
    int sum = 0;
    for (int i = 0; i < 32; i++)
    {
        size_t count = 0;
        for (int j = 0; j < numsSize; j++)
        {
            count += (nums[j] >> i) & 1;
        }
        sum += (count % 3) << i;
    }
    return sum;
}